package cn.openea.perpartner.rule.interceptor;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * @author Weird077
 * @description TODO
 * @date 2022-07-21 14:49
 */
@Configuration
public class WebAppConfigurer implements WebMvcConfigurer {
    @Resource
    private UserContextInterceptor userContextInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        // 可添加多个
        registry.addInterceptor(userContextInterceptor).addPathPatterns("/**");
    }
}
